package com.phs.main.redis;

import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;

public class RedisCacheManager implements CacheManager {

	/**
	 * @param cacheName 认证或授权统一名称
	 * @param <K> 键
	 * @param <V> 值
	 * @return 缓存
	 * @throws CacheException 报错
	 */
	@Override
	public <K, V> Cache<K, V> getCache(String cacheName) throws CacheException {
		return new RedisCache<>(cacheName);
	}
}
